package com.imut.service.impl;


import com.imut.entity.Publisher;
import com.imut.mapper.PublisherMapper;
import com.imut.service.PublisherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PublisherServiceImpl implements PublisherService {
    @Autowired
    private PublisherMapper publisherMapper;


    @Override
    public boolean insertAll(Publisher publisher) {
        int i = publisherMapper.insertAll(publisher);
        return i != 0;
    }

    @Override
    public boolean updateById(Publisher publisher) {
        int i = publisherMapper.updateById(publisher);
        return i != 0;
    }

    @Override
    public boolean deleteById(Integer id) {
        int i = publisherMapper.deleteById(id);
        return i != 0;
    }

    @Override
    public Publisher selectById(Integer id) {
        return publisherMapper.selectById(id);
    }

    @Override
    public List<Publisher> selectAll(Publisher publisher) {
        return publisherMapper.selectAll(publisher);
    }

}
